<?php
if (!defined('NICED_IN')) die('Access Denied!');
$cfg = array();
$cfg['default_request_name']       = 'sample.index';//can be null
$cfg['page_size'] = 100; //default page size
$cfg['version']   = 100; //version
$cfg['debug']     = true; //true or false
$cfg['__MAIN__']  = realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME']) ? true : false;
$cfg["load_from_db"] = true;
$cfg["cache"]["expire"]   = 300;
$cfg["cache"]["enable"]   = true;
$cfg["memcache"]["namespace"]   = "cloudsearch";
$cfg["env"] = "prod";//prod,test,dev,pre
$cfg["niced_log_level"] = "DEBUG";//product,test,dev,pre

$cfg['log_type'] = "error_log";
$cfg['log_level'] = "DEBUG";//value range see functions.php, like debug, error, info, warn
$cfg['log_filepath'] = "/tmp";
$cfg['log_filename_prefix'] = "";
$cfg['log_filename_format'] = "";

$cfg['unnecessary_secondary_password'] = false;
//$cfg["runtime_time"]["items"] = array();//use in functions for NICED_TIME_XXX
//$cfg["runtime_multi_time"]["items"] = array();//use in functions for NICED_MULTI_TIME_XXX
$cfg["runtime_time"]["log_level"] = "INFO";
$cfg["access_log"]["enable"] = true;
$cfg["access_log"]["items"]  = array();

$cfg["trace_info"] = array();

$cfg['index_page_name'] = "";//index.php

//static files base path,relative document root
$cfg['site_path']        = "";//if dir is /var/www/html/niced,document root is /var/www/html,this option should be niced/application/public_html
$cfg['path_public_html'] = '';//if document root is /var/www/html/,this option should be niced/application/public_html
$cfg['path_static']      = $cfg['path_public_html'].'/static';

$cfg['path_css']         = $cfg['path_static']."/css";
$cfg['path_js']          = $cfg['path_static']."/js";
$cfg['path_image']       = $cfg['path_static']."/images";

//for user ip
$cfg["load_user_ip"] = false;//true or false
//$cfg["allow_ip"]     = array("10.249", "172.168");//allow safe ip, Regular Expression


//for domain
$cfg["domain"]  = "niced";
$cfg["TLD"]     = "com";
$cfg["host_name_suffix"] = $cfg["domain"].".".$cfg["TLD"];

$cfg["main_server_name_prefix"] = "www";
$cfg["css_server_name_prefix"]  = "css";
$cfg["js_server_name_prefix"]   = "js";
$cfg["image_server_name_prefix"]   = "image";

$cfg["main_server_name"] = $cfg["main_server_name_prefix"].".".$cfg["host_name_suffix"];

$cfg["main_domain"] = "http://".$cfg["main_server_name_prefix"].".".$cfg["host_name_suffix"];
$cfg["css_domain"]  = "http://".$cfg["css_server_name_prefix"].".".$cfg["host_name_suffix"];
$cfg["js_domain"]   = "http://".$cfg["js_server_name_prefix"].".".$cfg["host_name_suffix"];
$cfg["image_domain"]   = "http://".$cfg["image_server_name_prefix"].".".$cfg["host_name_suffix"];
$cfg["cdn_domain"]   = "http://".$cfg["image_server_name_prefix"].".".$cfg["host_name_suffix"];

$cfg["main_server_name_prefix_override"] = "www";
$cfg["css_server_name_prefix_override"]  = "www";
$cfg["js_server_name_prefix_override"]   = "www";
$cfg["image_server_name_prefix_override"]   = "www";

$cfg["local_domain_enable"] = true;

//for developer db
$cfg['developer'] = 'admin';
$cfg['developer_db_dir'] = '/var/www/html/niced/application/developer_db';



/*******for no web server rewrite**************/
//$cfg['index_page_name'] = "index.php";//index.php
////static files base path,relative document root
//$cfg['site_path']        = "niced/application/public_html";//if dir is /var/www/html/niced,document root is /var/www/html,this option should be niced/application/public_html
//$cfg['path_public_html'] = '';//if document root is /var/www/html/,site_path is niced/application/public_html, this option should be "", this option is relative to site_path
//$cfg['path_static']      = $cfg['path_public_html'].'/static';
